;;; packages - package definitions for GNU Guix
;;; Copyright (C) 2017 ng0
;;;
;;; This program is free software: you can redistribute it and/or modify
;;; it under the terms of the GNU Affero General Public License as
;;; published by the Free Software Foundation, either version 3 of the
;;; License, or (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU Affero General Public License for more details.
;;;
;;; You should have received a copy of the GNU Affero General Public License
;;; along with this program.  If not, see <http://www.gnu.org/licenses/>.

(define-module (ng0 packages personalized)
  #:use-module (guix build-system gnu)
  #:use-module (guix download)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (gnu packages)
  #:use-module (gnu packages suckless)
  #:use-module (gnu packages irc)
  #:use-module (gnu packages tls))

;; Packages which are slightly altered from upstream Guix
(define* (suckless-uri name version #:optional (extension ".tar.gz"))
  "Return a URI string for the package hosted on suckless.org
corresponding to NAME and VERSION.  EXTENSION is the file name
extension, such as '.tar.gz'."
  (string-append "http://dl.suckless.org"
                 "/" name "/"
                 name "-" version extension))

(define-public st-full
  (package
    (inherit st)
    (name "st-full")
    (version (package-version st))
    (source
     (origin
       (method url-fetch)
       (uri (suckless-uri "st" version))
       (patches (search-patches ;; Currently doesn't do what it should:
                                ;; "st-full-delkey-0.7.diff"
                                "st-full-scrollback-0.7.diff"))
       (sha256
        (base32
         "00309qiw20rc89696pk8bdr7ik4r1aarik7jxqk8k66cdj80v1zp"))))))

(define-public ii-ssl
  (package
    (inherit ii)
    (name "ii-ssl")
    (version (package-version ii))
    (source
     (origin
       (method url-fetch)
       (uri (suckless-uri "ii" version))
       (patches (search-patches "ii-1.7-ssl.diff"))
       (sha256
        (base32
         "176cqwnn6h7w4kbfd66hzqa243l26pqp2b06bii0nmnm0rkaqwis"))))
    (inputs
     `(("libressl" ,libressl)))))
